package com.bit.ThreadTest.newTest;

import java.util.concurrent.atomic.AtomicInteger;

public class TestCAS {
    public static void main(String[] args) {
        AtomicInteger num = new AtomicInteger(1);
        System.out.println(num.getAndIncrement());      //num++
        System.out.println(num.incrementAndGet());      //++num
    }
}
